The growing integration of decentralized energy technologies such as distributed generation units, microgrids, and systems with bidirectional power flow has significantly complicated the task of maintaining grid stability. Conventional centralized control strategies often fall short when addressing the localized, rapidly changing dynamics of decentralized electrical networks. This paper explores the use of traditional machine learning technics and advanced deep learning models namely Random Forest (RF), Support Vector Machine (SVM), and Convolutional Neural Networks (CNN) to forecast stability conditions in such distributed systems. A dataset of UCIs from kaggle repository is taken into consideration of simulated measurements like tau[x], p[x], g[x], stab, stabf, and node-based interactions, is employed for model development and evaluation. The RF algorithm proves effective in handling diverse input features and offers interpretable results achieving a peak prediction accuracy of 98.95%, while the SVM model excels at classifying distinct stability states with an accuracy of 96.75%, whereas CNNs classifies confusion matrix with 81% accuracy. The findings demonstrate that decentralized deployment of intelligent, data-driven models can enable autonomous decision-making and enhance system robustness. Overall, this study highlights machine learning as a promising tool for ensuring stability in next-generation decentralized power infrastructures.
Introduction
The shift to decentralized renewable energy-based smart grids introduces complexity due to the dynamic and non-linear nature of sources like solar, wind, and batteries. To address the resulting stability challenges, this study explores Machine Learning (ML) and Deep Learning (DL) methods to predict grid stability under such setups.
Key Focus Areas
Decentralized Smart Grid Control (DSGC): Replaces centralized coordination with localized decision-making using real-time grid measurements.
Challenges: Traditional models assume fixed, symmetric conditions, which reduce real-world applicability.
Solution: Leverage ML/DL to learn complex, non-linear patterns from real-time grid data without such rigid assumptions.
Contributions
Developed a data-driven ML/DL framework for classifying grid states (stable/unstable).
Compared performance of Random Forest, Support Vector Machine (SVM), and Convolutional Neural Network (CNN).
Trained models on a 4-node DSGC dataset (10,000 records) with 14 parameters, focusing on system response, power consumption/production, and elasticity coefficients.
Used visualizations and statistical tools to interpret model behavior and feature importance.
Demonstrated Random Forest's superior performance, making it suitable for real-time deployment with PMU/SCADA systems.
CNN & SVM showed promising but less consistent results.
LSTM was less suitable, likely due to smaller dataset size.
Visual & Analytical Insights
KDE Plots & Histograms: Showed key features like stab, tau, and g parameters had clear class separability.
Correlation Matrix:
tau and g had positive correlation with stability.
Power values (p) were negatively correlated with each other but not strongly linked to stability.
Deployment & Real-Time Use
The best-performing Random Forest model was saved with joblib for integration into real-time grid monitoring systems using PMU/SCADA data.
Conclusion
This paper presents a data-driven methodology for predicting electrical grid stability, utilizing both traditional machine learning techniques and more sophisticated deep learning models. A performance comparison based on accuracy, precision, recall, and F1-score—was conducted to evaluate how these models perform in the context of assessing and forecasting grid stability in complex power systems. The goal was to highlight the effectiveness of AI in enabling real-time grid condition prediction and guiding necessary actions during disturbances to maintain stability. The analysis identified the Random Forest model as the most reliable, achieving a high accuracy of 98.95%, followed by Support Vector Machines (SVM) with an average accuracy of 96.75%. While the Convolutional Neural Network (CNN) model reached an accuracy of 81%, the Long Short-Term Memory (LSTM) model underperformed, suggesting that it may require additional training data or further tuning of hyperparameters. Based on the evaluation metrics, Random Forest is recommended for immediate deployment or further optimization, while SVM could serve as a viable alternative or a backup. In summary, traditional machine learning models demonstrate strong performance, particularly when there is a need to strike a balance between model complexity and predictive accuracy.
References
[1] M. Hinz and A. Drossel, “Decentralized Smart Grid Stability Modeling with Machine Learning,” Energies, vol. 16, no. 22, p. 7562, Nov. 2023.
[2] J. Liu et al., “Deep Neural Network-Based Smart Grid Stability Analysis,” Energies, vol. 17, no. 11, p. 2642, 2024.
[3] A. Kumar et al., “Renewable Energy Management in Smart Grids Using Big Data Analytics,” International Journal of Energy Research, vol. 47, no. 2, pp. 1498–1515, 2023.
[4] R. Sharma et al., “A Machine Learning-Based Model for Stability Prediction of Decentralized Smart Grid Control Systems,” Journal of Electrical and Computer Engineering, vol. 2022, Article ID 2697303, 2022.
[5] M. A. Rana et al., “Predicting Smart Grid Stability with Optimized Deep Models,” IEEE Access, vol. 11, pp. 54322–54332, 2023.
[6] S. Roy et al., “Metaheuristic Optimization with Deep Learning Enabled Smart Grid Stability Prediction,” Journal of Information Security and Applications, vol. 77, p. 103743, 2023.
[7] H. Zhang and Y. Wang, “A Novel Approach to Predicting the Stability of the Smart Grid,” Applied Energy, vol. 314, p. 118973, 2022.
[8] P. Singh et al., “Review on Smart Grid Load Forecasting for Smart Energy Management Using Machine Learning,” IEEE Systems Journal, vol. 17, no. 3, pp. 3567–3578, 2023.
[9] A. Khan et al., “Optimizing Smart Power Grid Stability Based on the Prediction of a Deep Learning Model,” JOIV: International Journal on Informatics Visualization, vol. 7, no. 1, pp. 1–9, 2023.
[10] L. Zhang et al., “Leveraging the Power of Machine Learning and Data Balancing Techniques for Smart Grid Stability Prediction,” Electric Power Systems Research, vol. 214, p. 108998, 2023.
[11] K. Patel et al., “Classification of Smart Grid Stability Prediction Using Cascade Machine Learning Methods,” Neural Computing and Applications, vol. 35, pp. 14567–14584, 2023.
[12] T. Preusse et al., “Predicting Stability of a Decentralized Power Grid Linking Electricity Price to Frequency,” Journal of Reliable Intelligent Environments, vol. 5, pp. 167–180, 2019.
[13] R. Joshi and M. S. Islam, “A Short Report on Deep Learning Synergy for Decentralized Smart Grid Cybersecurity,” Frontiers in Artificial Intelligence, vol. 6, 2025.
[14] A. S. Rajput, “Smart Grid Stability Prediction Using Machine Learning,” GitHub Repository, 2024.
[15] P. Breviglieri, “Data Science for Smart Grid Stability,” GitHub Repository, 2024.
[16] T. Preusse, C. Möhrke, and A. Drossel, “Predicting Stability of a Decentralized Power Grid Linking Electricity Price to Frequency,” Journal of Reliable Intelligent Environments, 2019.
[17] Y. Li et al., “FedDiSC: A Computation-Efficient Federated Learning Framework for Power Systems Disturbance and Cyber Attack Discrimination,” IEEE Transactions on Smart Grid, vol. 14, no. 1, pp. 515–526, Jan. 2023.
[18] M. Chen et al., “Learning Regionally Decentralized AC Optimal Power Flows with ADMM,” IEEE Transactions on Power Systems, vol. 39, no. 2, pp. 1728–1741, 2024.
[19] R. Rahman and D. Zhao, “Electrical Load Forecasting Using Edge Computing and Federated Learning,” Applied Energy, vol. 330, p. 120317, 2023.
[20] X. Li and J. Wu, “A Review of Federated Learning in Energy Systems,” Energy Reports, vol. 9, pp. 2789–2805, 2023.